macro_rules! cache_key {
    (
        $(
            $variant:ident => $key:literal
        ),*
        $(,)?
    ) => {
        #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
        pub enum CacheKey {
            $($variant),*
        }

        impl CacheKey {
            pub fn key(&self) -> &'static str {
                match self {
                    $(CacheKey::$variant => $key),*
                }
            }
        }

        $(
            pub const $variant: CacheKey = CacheKey::$variant;
        )*
    };
}

cache_key!{
    SYSTEM_USER => "system:user:{}",
}
